<?php use_helper('I18N') ?>
<?php use_javascript('help.js') ?>
<?php use_javascript('search.js') ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <?php include_http_metas() ?>
    <?php include_metas() ?>
    <?php include_title() ?>
    <link rel="shortcut icon" href="/favicon.ico" />
    <?php include_stylesheets() ?>
    <?php include_javascripts() ?>
  </head>
  <body>
<?php 
    $modName = $sf_context->getModuleName(); 
    if ($modName == 'sfGuardAuth' || $modName == 'sfGuardRegister')
        $authenticatedView = false;
    else
        $authenticatedView = true;
?>
<div class="wrapper">
<?php if ($authenticatedView): ?>
    <div class="myBox-content">
<?php endif ?>

<?php if ($sf_user->hasFlash('notice')): ?>
  <div class="flash_notice">
  <img src="/images/check_box.jpg" />
  <?php echo $sf_user->getFlash('notice') ?>
  </div>
<?php endif ?>
 
<?php if ($sf_user->hasFlash('error')): ?>
  <div class="flash_error"><?php echo $sf_user->getFlash('error') ?></div>
<?php endif ?>

<?php echo $sf_content ?>

<?php if ($authenticatedView): ?>
    </div>
<?php endif ?>    
    
<?php if ($authenticatedView): ?>
    <div class="myBox_RightMenu">
        <ul class="menu">
            <li><?php echo link_to('Logout', 'sf_guard_signout') ?></li>
            <li><hr></li>
            <li><a href="<?php echo url_for('/profile') ?>">Profile</a></li>
            <li>Groups</li>
            <li><a href="<?php echo url_for('/profile/showlist') ?>">My Girls</a></li>
            <li><a href="<?php echo url_for('/profile/add') ?>">Add new girl</a></li>
            <li>News</li>
            <li><a href="<?php echo url_for('/profile/rules') ?>">Rules</a></li>
            <li><hr></li>
            <li><a href="<?php echo url_for('/sfGuardRegister/registerGroup') ?>">Create a group</a></li>
            <li><a href="<?php echo url_for('/sfGuardRegister/registerGroup') ?>">Join a group</a></li>
            <li>Invite a friend</li>
        </ul>
    </div>
<?php endif ?>


<?php if (!$authenticatedView): ?>
    <div class="myBox_gofish">
        <span style="font-size:55px"><BR></span>
        <i>Go</i>Shark
    </div>
<?php else: ?>
    <div class="myBox_gofishLogo">
        <span style="font-size:50px"><BR></span>
        <i>Go</i>Shark
    </div>
<?php endif ?>

</div>
<div class="footer">
<?php $routes = $sf_context->getRouting()->getRoutes() ?>

<?php if (!$authenticatedView): ?>
    <table id="footerTable">
        <tr>
            <td style="text-align:left;">
                <?php if (isset($routes['sf_guard_register'])): ?>
                    &nbsp; <a href="<?php echo url_for('@sf_guard_register') ?>"><?php echo __('Create an <i>account</i>', null, 'sf_guard') ?></a>
                <?php endif; ?>
            </td>
            <td style="text-align:right;">
                <?php if (isset($routes['sf_guard_forgot_password'])): ?>
                    <a href="<?php echo url_for('@sf_guard_forgot_password') ?>"><?php echo __('<i>Forgot</i> password?', null, 'sf_guard') ?></a>
                <?php endif; ?>
            </td>
        </tr>
    </table>
<?php endif ?>
  <hr id="footerLine">
  <div>2011© GoShark</div>
</div>
  </body>
</html>